/**
 * Created by mac on 2017/12/14.
 */
import React, { Component } from 'react';
import { View, Image, StyleSheet, ScrollView, TouchableOpacity,Keyboard } from 'react-native';
import { Label } from 'iftide';
import Basic from './demo/Basic';
import Basic1 from './demo/Basic1';
import Basic2 from './demo/Basic2';


export default class TextInput_Demo extends Component{
    constructor(props) {
        super(props);
    }

    dismissKeyboardClick(){
        Keyboard.dismiss();
    }
    
    render() {
        return (
            <ScrollView keyboardShouldPersistTaps={'always'}>
                <TouchableOpacity activeOpacity={1.0} onPress={()=>this.dismissKeyboardClick()}>
                    <View style={{flex:1}}>
                        <View style={styles.container}>
                            <Label text = '常规文本框 - 样式一' fontWeight={'bold'} textDecorationLine={'underline'}/>
                        </View>
                        <Basic/>
                        <View style={styles.container}>
                            <Label text = '常规文本框 - 样式二' fontWeight={'bold'} textDecorationLine={'underline'}/>
                        </View>
                        <Basic1/>

                        <View style={styles.container}>
                            <Label text = '常规文本框 - 禁用' fontWeight={'bold'} textDecorationLine={'underline'}/>
                        </View>
                        <Basic2/>
                    </View>
                </TouchableOpacity>
            </ScrollView>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        paddingHorizontal: 13,
        paddingVertical: 8,
        backgroundColor: '#F5F7F9',
    },
});